def debug(*values: object,
    sep: str | None = " ",
    end: str | None = "\n",
    color: str | None = None
    ):
    assert (color is None) or color=='red', "invalid color in debug !"

    try:
        if color=='red':
            print('\033[31m', end='')
        print("[debug]", end=' ')
        print(*values, sep=sep, end=end)
        if color=='red':
            print('\033[0m', end='')
    except Exception as e:
        print('\033[31m', end='')
        print(f"debug running failed", e)
        print('\033[0m', end='')


    
if __name__=='__main__':
    lst=[]
    debug(lst[3], color='red')
    debug("hello world")
    debug("hello world")